<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page isELIgnored="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="overflow-y: visible;">
    <jsp:include page="../../../include/IncludeMain.jsp"></jsp:include>
  	<body style="overflow-y: visible;" onload="changeRowColor();">
    	<table class="mainTable">
		<thead>
			<tr class="tableController">
				<th colspan="7">
					<h3>采购单列表</h3>
					<div class="tableControllerButton">
						<a class="button" href="javascript:void(0)" onclick="this.blur(); window.location='${pageContext.request.contextPath }/pages/purchase/purchaseAction!get'; return false;"><span><img src="${pageContext.request.contextPath }/js/kui/icons/application_add.png" align="absmiddle"/>&nbsp;添加</span></a>
						<a class="button" href="javascript:void(0)" onclick="this.blur(); deleteAll(); 'return false';"><span><img src="${pageContext.request.contextPath }/js/kui/icons/application_delete.png" align="absmiddle"/>&nbsp;删除</span></a>
					</div>
				</th>
			</tr>
			<tr class="tableTitle">
				<th>
					<h3><input type="checkbox" onclick="selectAll(this);"/></h3>
				</th>
				<th>
					<h3>采购单号</h3>
				</th>
				<th>
					<h3>经办人</h3>
				</th>
				<th>
					<h3>采购日期</h3>
				</th>
				<th >
					<h3>备注</h3>
				</th>
				<th>
					<h3>操作</h3>
				</th>                     
			</tr>
		</thead>
		<tbody>
		<form action="${pageContext.request.contextPath }/pages/purchase/purchaseAction!del" name="myForm" id="myForm" method="post">
			<input type="hidden" name="purchase_id" value="${purchase.id }">
			<c:forEach items="${pager.data}" var="purchase">
			<c:if test="${purchase.id!= null}">
			<tr>				
				<td width="20px"><input type="checkbox" name="id" value="${purchase.id}"/></td>
				<td>${purchase.purchase_id}</td>
				<td>${purchase.person}</td>
				<td>${purchase.date}</td>
				<td width="30%">${purchase.comments}&nbsp;</td>
				<td>
					<a class="button-small" href="javascript:void(0)" onclick="this.blur(); window.location='${pageContext.request.contextPath }/pages/purchase/purchaseDetailAction!list?purchase_id=${purchase.id }'; return false;"><span>采购单明细</span></a>
					<a class="button-small" href="${pageContext.request.contextPath }/pages/purchase/purchaseDetailAction!print?purchase_id=${purchase.id }" target="_blank" ><span>打印采购单</span></a>
					<a class="button-small" href="javascript:void(0)" onclick="this.blur(); window.location='${pageContext.request.contextPath }/pages/purchase/purchaseAction!get?purchase.id=${purchase.id }'; return false;"><span>修改</span></a>
					<a class="button-small" href="javascript:void(0)" onclick="this.blur(); deleteOne('${pageContext.request.contextPath }/pages/purchase/purchaseAction!del?id=${purchase.id }'); return false;"><span>删除</span></a>
				</td>
			</tr>
			</c:if>
			</c:forEach>
		</form>
		</tbody>
		<tfoot>
			<tr  class="tableController_bottom">
				<td colspan="7" align="center">
					<jsp:include page="../../../include/SplitPage.jsp">
						<jsp:param name="pager" value="${action.pager}"/>
					</jsp:include>
				</td>
			</tr>
		</tfoot>
	</table>
	
  </body>
</html>
